package com.yc3;

import com.yc3.system.Container;
import com.yc3.user.student;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @ClassName main
 * @since: 2023/7/26 09:26
 * @auth: kirito
 * @description:
 **/
public class main {
    public static void main(String[] args) {
        ApplicationContext ac = new AnnotationConfigApplicationContext(config.class);
        Container students = (Container) ac.getBean("container");
//        Container<student> students = new Container<>();
        student a = new student("a", 1.70, 60);
        student b = new student("b", 1.75, 65);
        student c = new student("c", 1.85, 80);
        student d= new student("异常", 0.3, 600);
        students.add(a);
        students.add(b);
        students.add(c);
        students.add(d);

        System.out.println(students.getMax());
        System.out.println(students.getMin());
        System.out.println(students.getAvg());
        System.out.println(students.size());
    }
}
